
  function(indexed_store_save )
    this_get(indices)
    this_get(store_dir)
    cmake_serialize("${ARGN}")
    ans(serialized)

    this_get(key)
    if(key)
      call2("${key}" ${ARGN})
      ans(key_value)
      checksum_string("${key_value}")
      ans(key)
    else()
      checksum_string("${serialized}")
      ans(key)
    endif()


    set(store_key "${key}-${key}-${key}")
    fwrite("${store_dir}/${store_key}" "${serialized}")
    foreach(index ${indices})
      map_get(${index} name)
      ans(name)
      map_get(${index} selector)
      ans(selector)
      call2("${selector}" "${ARGN}")
      ans(value)
      if(NOT "${value}_" STREQUAL "_")
        checksum_string("${name}==${value}")
        ans(hash)
        checksum_string("${name}")
        ans(index_hash)
        set(index_key "${store_dir}/${hash}-${key}-${index_hash}")
        fwrite("${index_key}" "${value}")
      endif()
    endforeach()
    return_ref(key)
  endfunction()

